import request from "@/utils/request";
/**
 * 人员到访列表
 * @param {*} data
 * @returns
 */
export function API_visitList(params) {
  return request({
    url: "/visit/list",
    method: "get",
    params,
  });
}

/**
 * 人员到访新增
 * @returns
 */
export function API_visitCreate(data) {
  return request({
    url: "/visit/create",
    method: "post",
    data,
  });
}

/**
 * 人员到访修改
 * @returns
 */
export function API_visitEdit(data) {
  return request({
    url: `/visit/edit/${data.code}`,
    method: "put",
    data,
  });
}

/**
 * 人员到访删除
 * @returns
 */
export function API_visitDelete(data) {
  return request({
    url: `/visit/delete/${data.code}`,
    method: "delete",
  });
}

/**
 * 人员到访记录
 * @returns
 */
export function API_visitGet(params) {
  return request({
    url: "/visit/get",
    method: "get",
    params,
  });
}
